﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace PDFDesign.Model
{
    public class ReportData
    {
        [JsonProperty("reportName")]
        public string ReportName { get; set; }
        [JsonProperty("masterFields")]
        public List<MasterField> MasterFields { get; set; }
        [JsonProperty("detailFields")]
        public List<DetailField> DetailFields { get; set; }
        [JsonProperty("pages")]
        public List<Page> Pages { get; set; }
    }

    public class MasterField
    {
        [JsonProperty("name")]
        public string Name { get; set; }
        [JsonProperty("dataField")]
        public string DataField { get; set; }
        [JsonProperty("hasValue")]
        public bool HasValue { get; set; }
        [JsonProperty("isFooter")]
        public bool IsFooter { get; set; }
        [JsonProperty("isTitle")]
        public bool IsTitle { get; set; }
        [JsonProperty("hidden")]
        public bool Hidden { get; set; }
        [JsonProperty("value")]
        public string Value { get; set; }
    }

    public class DetailField
    {
        [JsonProperty("name")]
        public string Name { get; set; }
        [JsonProperty("dataField")]
        public string DataField { get; set; }
        [JsonProperty("hasValue")]
        public bool HasValue { get; set; }
        [JsonProperty("isFooter")]
        public bool IsFooter { get; set; }
        [JsonProperty("caption")]
        public string Caption { get; set; }
    }

    public class Page
    {
        [JsonProperty("master")]
        public object Master { get; set; }
        [JsonProperty("detailList")]
        public List<object> DetailList { get; set; }
        [JsonProperty("key")]
        public string Key { get; set; }
    }
}
